<script type="">    

    function submit_mark(){
        var exercise = $('#current_exercise').val();        
        var mark = $('#mark_exercise').val();                
        
        var strUrl = '<?=$url->createUrl("group/ajaxExerciseMark") ?>';            
        loadingAjax();        
        $.ajax({
            type: "GET",
            url: strUrl,
            data: {exercise:exercise,mark:mark},
            success: function(msg){                            
                if(msg==1){                                           
                    location.reload(true);
                }
            }
        });
        closeLoadingAjax();          
        
    }
    
    function show_detail(exercise_id,exercise_grade){        
        $('#mark_exercise').val('');
        $('.detail_exercise').hide('slow');        
        $('.detail_exercise_'+exercise_id).show('slow');        
        $('#current_exercise').val(exercise_id);
        $('#mark_exercise').val(exercise_grade);
    }

</script>